
@mixin pos($top:0,$right: $top,$bottom: $top,$left: $right){
	top: $top;
	right: $right;
	bottom: $bottom;
  left: $left;
}
@mixin inline($child:null,$class:null){
	display:flex;
	align-items:center;
	// 文字组默认上对齐
	&>.text-group{
		align-self:flex-start;
	}
	@each $childOne in $child {
		@if $childOne != null{
		  &>*:nth-child(#{$childOne}){
		  	//display: block;//兼容部分浏览器由于影响子元素布局，现去掉
				
				width: 0;
				flex: 1;
			}
	  }
	}
	@each $classOne in $class {
		@if $classOne != null {
		  &>#{$classOne}{ 
		  	// display: block;
				width: 0;
				flex: 1;
			}
	  }
	}
}


// 圆角
@mixin badge($width: 100%) {
    min-width: $width;
    min-height: $width;
    border-radius: $width;
    line-height: $width;
    text-align: center;
    box-sizing: initial;
}
// 多行文本溢出显示省略号
// -----------------------------------------------------------------------------
@mixin text-area-overflow($line: 2, $line-height: .38rem) {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: $line;
  -webkit-box-orient: vertical;
  word-break: break-all;
  text-overflow: ellipsis;
  line-height: $line-height;
  max-height: $line-height * $line + .2rem;
}

// 单行文本溢出显示省略号
// -----------------------------------------------------------------------------
@mixin text-overflow($align: justify) {
  word-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  text-align: $align;
}
// 一像素边框
// -----------------------------------------------------------------------------
@mixin top-line($color, $zindex: 0) {
  content: '';
  position: absolute;
  z-index: $zindex;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  border-top: 1px solid $color;
  -webkit-transform: scaleY(.5);
  transform: scaleY(.5);
  -webkit-transform-origin: 0 0;
  transform-origin: 0 0;
}

@mixin bottom-line($color, $zindex: 0) {
  content: '';
  position: absolute;
  z-index: $zindex;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  border-bottom: 1px solid $color;
  -webkit-transform: scaleY(.5);
  transform: scaleY(.5);
  -webkit-transform-origin: 0 0;
  transform-origin: 0 0;
}

@mixin left-line($color, $zindex: 0) {
  content: '';
  position: absolute;
  z-index: $zindex;
  top: 0;
  left: 0;
  height: 100%;
  border-left: 1px solid $color;
  -webkit-transform: scaleX(.5);
  transform: scaleX(.5);
  -webkit-transform-origin: 0 0;
  transform-origin: 0 0;
}

@mixin right-line($color, $zindex: 0) {
  content: '';
  position: absolute;
  z-index: $zindex;
  top: 0;
  right: 0;
  height: 100%;
  border-right: 1px solid $color;
  -webkit-transform: scaleX(.5);
  transform: scaleX(.5);
  -webkit-transform-origin: 0 0;
  transform-origin: 0 0;
}
// 上面是自定义

@mixin clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

@mixin scrollBar {
  &::-webkit-scrollbar-track-piece {
    background: #d3dce6;
  }
  &::-webkit-scrollbar {
    width: 6px;
  }
  &::-webkit-scrollbar-thumb {
    background: #99a9bf;
    border-radius: 20px;
  }
}

@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}

@mixin pct($pct) {
  width: #{$pct};
  position: relative;
  margin: 0 auto;
}

@mixin triangle($width, $height, $color, $direction) {
  $width: $width/2;
  $color-border-style: $height solid $color;
  $transparent-border-style: $width solid transparent;
  height: 0;
  width: 0;
  @if $direction==up {
    border-bottom: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  }
  @else if $direction==right {
    border-left: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }
  @else if $direction==down {
    border-top: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  }
  @else if $direction==left {
    border-right: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }
}
